home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / wtj007.zip / BAKER.ZIP / NETBIOS.ASM next >
Assembly Source File  |  1992-07-24  |  779b  |  35 lines

  1. ; NetBIOS.asm for use in Windows 3.x
  2. ; based on the Win32 specification
  3. ; author:    Steven Baker (5-18-92)
  4. ;
  5. ; UCHAR or BYTE PASCAL FAR NetBIOS (PCNB Ncb);
  6. ;
  7. ; Implemented with prolog/epilog for Windows 3.0 real mode
  8. ; which may be removed for protected-mode only usage
  9.  
  10. _TEXT    SEGMENT  WORD PUBLIC 'CODE'
  11.     ASSUME    CS: _TEXT
  12.  
  13. EXTRN    NETBIOSCALL:far
  14.  
  15.     PUBLIC    NETBIOS
  16. NETBIOS    PROC far
  17.     inc    bp            ; Real-mode prolog
  18.     push    bp
  19.  
  20.     mov    bp,sp
  21.     les    bx,DWORD PTR [bp+6]    ; Far pointer to our Ncb
  22.     call    FAR PTR NETBIOSCALL
  23.     mov    al,BYTE PTR es:[bx+1]
  24.     cmp    al,0ffh            ; 0ffh returned if asynchronous
  25.     jne    nb1            ;  request is accepted
  26.     xor    ax,ax            ; change to a result code of 0
  27. nb1:    mov    sp,bp
  28.     pop    bp
  29.     dec    bp            ; Real-mode epilog
  30.     ret    4
  31. NETBIOS    ENDP
  32.  
  33. _TEXT    ENDS
  34. END
  35.